﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="admin-sidebar.ascx.cs" Inherits="ArchitectSite.usercontrols.admin_sidebar" %>
	<div class="antiScroll">
	<div class="antiscroll-inner">
		<div class="antiscroll-content">
			<div class="sidebar_inner">
                <h3 style="padding-left:15px; color:#333;">Danh Mục</h3>
				<div id="side_accordion" class="accordion">	
                    <asp:Repeater runat="server" ID="SideBar" DataSourceID="SiteMapDataSourceAdmin">
                        <ItemTemplate>
                            <div class="accordion-group">
						        <div class="accordion-heading">
							        <a href='#<%#Eval("Title") %>' data-parent="#side_accordion" data-toggle="collapse" class="accordion-toggle">
								        <%#Eval("Title") %>
							        </a>
						        </div>
                                <%#Eval("HasChildNodes").ToString() == "True" ? "<div>" : "<div  style='display:none'>"%>
                                    <div class="accordion-body collapse" id='<%#Eval("Title") %>'>
							            <div class="accordion-inner">
								            <ul class="nav nav-list">
                                                <asp:Repeater runat="server" ID="ChildPage"  DataSource='<%#Eval("ChildNodes")%>' Visible='<%#Eval("HasChildNodes")%>'>
                                                    <ItemTemplate>
                                                        <li><a href='<%#Eval("url") %>'> <%#Eval("Title") %></a></li>
                                                    </ItemTemplate>                              
                                                </asp:Repeater>
						                    </ul>
							            </div>
						            </div>
                                </div>
					        </div>
                        </ItemTemplate>                        
                    </asp:Repeater>								
				<asp:SiteMapDataSource ID="SiteMapDataSourceAdmin" ShowStartingNode="false" runat="server" />
				</div>
                <%--<ul id="main-nav">
                    <!-- Accordion Menu -->
                    <!-- Add the class "current" to current menu item -->
                    <asp:Repeater ID="Repeater1" DataSourceID="SiteMapDataSource1" EnableViewState="false"
                        runat="server">
                        <ItemTemplate>
                            <li><a href='<%#Eval("url") %>' class="nav-top-item">
                                <%#Eval("Title") %></a>
                                <asp:Repeater ID="Repeater2" DataSource='<%#Eval("ChildNodes")%>' Visible='<%#Eval("HasChildNodes")%>'
                                    runat="server">
                                    <HeaderTemplate>
                                        <ul>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <li><a href='<%#Eval("url") %>'>
                                            <%#Eval("Title") %></a></li>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </ul></FooterTemplate>
                                </asp:Repeater>
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:SiteMapDataSource ID="SiteMapDataSource1" ShowStartingNode="false" runat="server" />
                </ul>--%>
			</div>
		</div>
	</div>
</div>